import request from '@/utils/request'
// 获取经纪列表
export function getAgentsList(params) {
  return request({
    url: '/agents',
    params
  })
}
// 获取经纪数量
export function getAgentsLength(params) {
  return request({
    url: `/agents/count`,
    params
  })
}
// 新建经纪
export function addAgents(data) {
  return request({
    url: '/agents',
    method: 'post',
    data
  })
}
// 删除经纪
export function delAgents(id) {
  return request({
    url: `/agents/${id}`,
    method: 'delete'
  })
}
// 编辑经纪
export function upDataAgents(data) {
  return request({
    url: `/agents/${data.id}`,
    method: 'put',
    data
  })
}
// 获取指定经纪
export function getSpecifiedAgent(id) {
  return request({
    url: `/agents/${id}`
  })
}
